<template>
	<view class="root">
		<Player :isVideo="parseInt(liveData.isvideo)===1"
		        :playUrl="liveData.pull"/>
		<view class="back" @click="back">返回</view>
	</view>
</template>

<script>
    import Player from '/src/components/live/Player'

    export default {
        name: "LiveRoom",
        components: {Player},
        data() {
            return {
                liveData: {},
            }
        },
        methods: {
            back() {
                uni.navigateBack()
            }
        },
        onLoad(params) {
            this.liveData = JSON.parse(params.liveData)
            console.log(this.liveData)
        }
    }
</script>

<style scoped>
	.back {
		position: absolute;
		width: 200px;
		height: 200px;
		background-color: #ccc;
	}
</style>
